<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- header -->
    <%@ include file="/WEB-INF/views/include/header.jsp" %>
</head>
<style>
    body{
        background: #fff;
    }
    table, th, td
    {
        border: 1px solid #ddd;
    }
</style>
<c:if test="${dept.deptRelation == '/01/'}">
<div>
    <button class="btn btn-success btn-sm" onclick="Township()">乡镇绩效</button>
    <button class="btn btn-success btn-sm" onclick="county()">县直绩效</button>
</div>
</c:if>
<div class="form-group">
    <c:if test="${dept.deptRelation=='/02/201/' or dept.deptRelation=='/02/202/'}">
    <h5>本单位任务完成率：${deptWCL}，得分${deptScore}，排名${deptSort}</h5>
    </c:if>
    <c:choose>
        <c:when test="${dept.deptRelation == '/01/'}">
        <%--//督察组的表--%>
            <table id="tbStudent" class="table Township">
        </c:when>
        <c:otherwise>
        <%-- //乡单位--%>
             <table id="tbStudent" class="table Township">
    </c:otherwise>
    </c:choose>
        <c:if test="${dept.deptRelation=='/02/201/' or dept.deptRelation=='/01/'}">
            <thead>
            <tr>
                <th class="number">排名</th>
                <th>单位名称</th>
                <th class="number">任务数</th>
                <th class="number">已完成数</th>
                <th class="number">完成率</th>
                <th class="number">总分</th>
                    <%--<th>合格</th>--%>
                    <%--<th>不合格</th>--%>
                    <%--<th>重办</th>--%>
                <th class="number">逾期</th>
            </tr>
            </thead>
            <c:forEach var="xiangzhendwMap" items="${xiangzhendwMapList}" varStatus="index">
                <tr>
                    <td>${(index.count*1)}</td>
                    <td>${xiangzhendwMap.deptName}</td>
                    <td>${xiangzhendwMap.allSize}</td>
                    <td>${xiangzhendwMap.ywcSize}</td>
                    <td>${xiangzhendwMap.wcl}%</td>
                    <%--<td><fmt:formatNumber type="number" value="${xiangzhendwMap.allSize == '0' ? 0 : ((xiangzhendwMap.ywcSize / xiangzhendwMap.allSize)*100)}" maxFractionDigits="2"/>%</td>--%>
                    <td>${xiangzhendwMap.scores}</td>
                    <%--<td>0</td>--%>
                    <%--<td>0</td>--%>
                    <%--<td>${xiangzhendwMap.cbSize}</td>--%>
                    <td>${xiangzhendwMap.yqSize}</td>
                </tr>
            </c:forEach>
         </table>
        </c:if>


    <c:choose>
        <c:when test="${dept.deptRelation == '/01/'}">
            <%--//督察组的表--%>
             <table id="tbStudent" class="table county" style="display: none">
        </c:when>
        <c:otherwise>
                <%-- //乡单位--%>
            <table id="tbStudent" class="table county">
        </c:otherwise>
    </c:choose>
        <%--县值--%>
        <c:if test="${dept.deptRelation=='/02/202/' or dept.deptRelation=='/01/'}">
            <thead>
            <tr>
                <th class="number">排名</th>
                <th>单位名称</th>
                <th class="number">任务数</th>
                <th class="number">已完成数</th>
                <th class="number">完成率</th>
                <th class="number">总分</th>
                    <%--<th>合格</th>--%>
                    <%--<th>不合格</th>--%>
                    <%--<th>重办</th>--%>
                <th class="number">逾期</th>
            </tr>
            </thead>
            <c:forEach var="xianzhidwMap" items="${xianzhidwMapList}" varStatus="index">
                <tr>
                    <td>${index.count}</td>
                    <td>${xianzhidwMap.deptName}</td>
                    <td>${xianzhidwMap.allSize}</td>
                    <td>${xianzhidwMap.ywcSize}</td>
                    <td>${xianzhidwMap.wcl}%</td>
                    <%--<td><fmt:formatNumber type="number" value="${xianzhidwMap.allSize == '0' ? 0 : ((xianzhidwMap.ywcSize / xianzhidwMap.allSize)*100)}" maxFractionDigits="2"/>%</td>--%>
                    <td>${xianzhidwMap.scores}</td>
                     <%--<td>0</td>--%>
                    <%--<td>0</td>--%>
                    <%--<td>${xianzhidwMap.cbSize}</td>--%>
                    <td>${xianzhidwMap.yqSize}</td>
                </tr>
            </c:forEach>
        </c:if>
    </table>
</div>

<%@ include file="/WEB-INF/views/include/footer.jsp" %>
<script type="text/javascript">
    $(function () {

        $('table').tablesort().data('tablesort');
        $('thead th.number').data('sortBy', function(th, td, sorter) {
            return parseInt(td.text(), 10);
        });
    })


    //    乡显示 隐藏
    function Township() {
        $(".Township").show().siblings().hide();
    }

    //    县显示 隐藏
    function county() {
        parseFloat()
        $(".county").show().siblings().hide();
    }
function parseFloat1(data) {
   return parseFloat(data)
}

</script>
</body>
</html>